草庐IT

python - Pip 安装失败 : SSL required

全部标签

ruby - 安装 ruby​​racer 时出现错误 "invalid gem: package is corrupt"

尝试在OSX10.9上安装therubyracer时,使用以下命令:$geminstalltherubyracer-v'0.12.0'我得到错误:ERROR:Errorinstallingtherubyracer:invalidgem:packageiscorrupt,exceptionwhileverifying:undefinedmethod`path2class'for#(NoMethodError)in/Users/doved/.rvm/gems/ruby-2.0.0-p353/cache/therubyracer-0.12.0.gemXCode开发者工具已安装,我已尝试删除缓

ruby -/usr/bin/env ruby​​_noexec_wrapper 失败,没有文件或目录

当我尝试将chef-solr作为服务启动时,它因以下错误而失败#servicechef-solrstartStartingchef-solr:/usr/bin/env:ruby_noexec_wrapper:Nosuchfileordirectory[FAILED]但是当我从命令行手动运行它时它运行成功#chef-solr-d-c/etc/chef/solr.rb-L/var/log/chef/solr.log-P/var/run/chef/solr.pid#echo$?0#ps-ef|grepchefroot269111204:19?00:00:01java-Xmx256M-Xms2

ruby-on-rails - TimeWithZone & Time.zone.now 集成测试失败

在Controller方法中,当向用户发送激活电子邮件时,我将用户变量activation_sent_at设置为等于Time.zone.now。在开发服务器上,这似乎可行(尽管我的应用程序中的时间表达式比我计算机的本地时间晚2小时)。我想包括一个集成测试,测试activation_sent_at是否确实设置正确。所以我包括了这一行:assert_equal@user.activation_sent_at,Time.zone.now但是,这会产生错误:NovisibledifferenceintheActiveSupport::TimeWithZone#inspectoutput.You

ruby-on-rails - 设计:注册失败时重定向?

我正在尝试重定向未通过注册表单的用户(例如,他们输入的用户名已被占用,他们将字段留空等...)我为登录表单失败的用户设置了自定义失败,代码如下:classCustomFailure但是,我一直在研究如何针对注册失败进行设置。理想情况下,我只想将它们重定向回/到root_path,有什么想法吗?谢谢! 最佳答案 您可能需要子类化Devise::RegistrationsController并覆盖创建操作。只需从here复制创建方法即可并在保存失败时修改重定向。#app/controllers/registrations_control

ruby-on-rails - Heroku Rails 部署失败,错误为 "could not connect to server: Connection refused"

在本地一切正常,但是当我尝试推送到heroku时出现错误:Running:rakeassets:precompileConnectingtodatabasespecifiedbyDATABASE_URLrakeaborted!couldnotconnecttoserver:ConnectionrefusedIstheserverrunningonhost"127.0.0.1"andacceptingTCP/IPconnectionsonport5432?/tmp/build_1903c764-07ce-4d06-aa45-6e78dec68af8/vendor/bundle/ruby/

ruby-on-rails - Nokogiri 不允许我在 Rails 中进行捆绑安装

我已经看到有人问过这个问题,并尝试了我所看到的所有建议。我有一台新的macbook,想设置一个现有的应用程序。当我克隆应用程序时,它不会捆绑安装并且就像Rails没有安装一样,即使它在其他目录中工作。我尝试从gemfile中删除版本号并删除gemfile.lock。我试过捆绑更新。我在osx10.9.4、rails4.1.5和ruby​​2.1.1上。我得到的错误:Anerroroccurredwhileinstallingnokogiri(1.6.3.1),andBundlercannotcontinue.Makesurethat`geminstallnokogiri-v'1.6.3

ruby-on-rails - 创建失败时 Ruby on Rails Active Record 返回值?

我是ruby​​onrails的新手,无法完成这项工作。基本上我有一个用户注册页面,其中有一个密码确认。在用户类中,我有以下验证:validates:password,confirmation:true在我的Controller中defcreatevals=params[:user]if(User.exists(vals[:username]))flash[:warning]="#{vals[:username]}alreadyexists!Pleasetryanewone."elsevals[:create_date]=DateTime.currentuser=User.create

ruby - 是否可以从本地缓存中 bundle/安装 gem?

我的电脑上有一堆我想在厨师食谱中使用的gem。我知道可以将它们放在像/tmp/gems这样的目录中,并且只是:cd/tmp/gemsgeminstall*.gem是否可以将所有gem放在一个目录中,这样我就可以使用bundler安装它们而无需再次下载它们?cd/somedir/my_rails_projectbundle我想节省带宽。 最佳答案 bundleinstall--local应该是你想要的。来自bundle-install手册页:--localDonotattempttoconnecttorubygems.org,inst

Ruby gem mysql2 安装错误

我在Windows7中安装了Ruby版本ruby​​1.9.2p0(2010-08-18)[i386-mingw32]。和gem版本1.3.7当我尝试安装mysqlgem时,它显示Failedtobuildgemnativeextension错误,这是为什么?我的mysql版本是5.1.36(WampServer)E:\RubyApps\test_app2>geminstallmysql2Buildingnativeextensions.Thiscouldtakeawhile...ERROR:Errorinstallingmysql2:ERROR:Failedtobuildgemnat

ruby-on-rails - Ruby on Rails - 捆绑安装期间出错

我一直在谷歌下面搜索这个错误,但我无法解决这个错误:Gem::Ext::BuildError:ERROR:Failedtobuildgemnativeextension./usr/bin/ruby2.1extconf.rbmkmf.rbcan'tfindheaderfilesforrubyat/usr/lib/ruby/include/ruby.hextconffailed,exitcode1Gemfileswillremaininstalledin/home/dyego/.bundler/tmp/9200/gems/sqlite3-1.3.9forinspection.Results